package cc.zy.base.businesses.service;

import cc.zy.base.businesses.entity.NetworkSchool;
import cc.zy.base.common.entity.QueryRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * Service接口
 *
 * @author jiangjinlin
 * @date 2021-01-22
 */
public interface INetworkSchoolService extends IService<NetworkSchool> {

    /**
     * 通过id和openId查找233网校的用户名密码
     *
     * @Author hutengjiao
     * @Date: 2021/4/6 13:45
     * @param [id, openId]
     * @return cc.zy.base.businesses.entity.NetworkSchool
     */
    NetworkSchool findByIdAndOpenId(Integer id);

    /**
     * 学生缴纳报名费后分配233网校的用户名密码
     *
     * @Author hutengjiao
     * @Date: 2021/4/6 13:46
     * @param
     * @return
     */
    Boolean allocationStu(NetworkSchool networkSchool);

    /**
     * 查询所有 分页
     *
     * @Author hutengjiao
     * @Date: 2021/4/19 13:57
     * @param [request, networkSchool]
     * @return com.baomidou.mybatisplus.core.metadata.IPage<cc.zy.base.businesses.entity.NetworkSchool>
     */
    IPage<NetworkSchool> listNetworkSchool(QueryRequest request, NetworkSchool networkSchool);

    /**
     * 获取报名费列表
     *
     * @Author hutengjiao
     * @Date: 2021/4/19 16:39
     */
    List<Map<String, Object>> findPrice();

    /**
     * 导入账号密码
     *
     * @Author hutengjiao
     * @Date: 2021/4/20 15:37
     * @param [multipartFile, session]
     * @return java.lang.String
     */
    public String readExcel(MultipartFile multipartFile, HttpSession session);

    /**
     * 查询所有，不分页
     *
     * @Author hutengjiao
     * @Date: 2021/4/21 12:04
     * @param [networkSchool]
     * @return java.util.List<cc.zy.base.businesses.entity.NetworkSchool>
     */
    List<NetworkSchool> listNetwork(NetworkSchool networkSchool);

    /**
     * 重置账号信息
     *
     * @Author hutengjiao
     * @Date: 2021/4/21 14:39
     * @param [username]
     * @return java.lang.Boolean
     */
    Boolean resetNetworkSchool(String username);


    /**
     * 添加备注
     *
     * @Author hutengjiao
     * @Date: 2021/4/21 15:12
     * @param [remark, username]
     * @return java.lang.Boolean
     */
    Boolean addremark(String remark, String username);

}